package v1

var (
	// common errors

	ErrSuccess             = newError(200, "ok")
	ErrBadRequest          = newError(400, "Bad Request")
	ErrUnauthorized        = newError(401, "Unauthorized")
	ErrNotFound            = newError(404, "Not Found")
	ErrInternalServerError = newError(500, "Internal Server Error")
	ErrParameterValidation = newError(1000, "Parameter Validation Error")

	// more biz errors

	ErrUserIdNotFound          = newError(1001, "User Id Not Found")
	ErrUsernameOrPasswordWrong = newError(1002, "Username Or Password Wrong")
	ErrBookNotFound            = newError(1003, "Book Not Found")
	ErrBorrowNotFound          = newError(1004, "Borrow Not Found")
	ErrViolationNotFound       = newError(1005, "Violation Not Found")

	ErrBookBorrowLimit   = newError(2001, "The number of books borrowed exceeds the limit")
	ErrBookAdminPassword = newError(2001, "The password is not correct")
	ErrCardNumber        = newError(2002, "The card number is not correct")
	ErrBookNumber        = newError(2003, "The book number is not correct")
	ErrOverdue           = newError(2004, "The book is overdue")

	ErrAdminParameterValidation              = newError(3001, "Parameter Validation Error")
	ErrAdminUsernameOrPasswordWrong          = newError(3002, "Username Or Password Wrong")
	ErrAdminBookNotFound                     = newError(3003, "Book Not Found")
	ErrAdminBookTypeNotFound                 = newError(3004, "BookType Not Found")
	ErrAdminLibraryCardNotFound              = newError(3005, "LibraryCard Not Found")
	ErrAdminUsernameAlreadyUse               = newError(3006, "Username Already Use")
	ErrAdminBookBorrowsNotFound              = newError(3007, "Book Borrows Not Found")
	ErrAdminBookBorrowRulesNotFound          = newError(3008, "Book Borrow Rules Not Found")
	ErrAdminBookAdminsNotFound               = newError(3009, "Book Admins Not Found")
	ErrAdminLibraryCardUsernameAlreadyExists = newError(3010, "LibraryCard Username Already Exists")
	ErrAdminBookAdminsUsernameAlreadyExists  = newError(3011, "BookAdmins Username Already Exists")
	ErrAdminBookAdminsDuplicate              = newError(3012, "BookAdmins Duplicates")
	ErrAdminBookTypeDuplicate                = newError(3013, "BookType Duplicates")
	ErrAdminBookRuleIdAlreadyExists          = newError(3014, "BookRule Id Already Exists")
)
